package base.spring.event;

import com.alibaba.fastjson.JSON;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author : GuoFei
 * @since : 2019/7/12 13:58
 */
@Component
public class MyEventListener implements ApplicationListener<MyOneEvent> {

    @Override
    public void onApplicationEvent(MyOneEvent event) {
        System.out.println("这是我的事件");
        System.out.println(JSON.toJSONString(event));
    }

}
